<template>
  <div class="main">
    <Tabs></Tabs>

    <el-main class="mainContent">
      <el-card class="mainCard">
        <router-view v-slot="{ Component, route }">
          <KeepAlive :include="keepAliveList">
            <component
              :is="Component"
              v-if="isRouterShow"
              :key="route.fullPath"
            />
          </KeepAlive>
        </router-view>
      </el-card>
    </el-main>

    <!-- <el-footer class="mainFooter"> -->
      <!-- <Footer /> -->
    <!-- </el-footer> -->
  </div>
</template>

<script setup lang="ts" name="login">
import routerStore from "@/stores/modules/routerStore";
import { KeepAlive, ref } from "vue";
import { RouterView } from "vue-router";
import { storeToRefs } from "pinia";

import Footer from "./components/Footer/index.vue";
import Tabs from "./components/Tabs/index.vue";

const { keepAliveList } = storeToRefs(routerStore());

// 注入刷新页面方法
const isRouterShow = ref(true);
</script>

<style scoped lang="scss">
@import "./index.module.scss";
</style>
